import json


class AlarmInfo(json.JSONEncoder):
    # 摄像头设备Id
    DeviceId = ''
    # 设备名字
    DeviceName = ''
    # 预警图片名字
    AlarmImageName = ''
    # 预警图片网络访问地址
    AlarmImageUrl = ''
    # 预警视频网络访问地址
    AlarmVideoUrl = ''
    # 预警时间
    AlarmTime = ''
    # 预警类别Id
    AlarmClassId = 0
    # 识别到目标
    AlarmTargetNum = 0

    # 初始化方法
    def _init_(self, device_id, device_name, alarm_image_name, alarm_time, alarm_class_id, alarm_target_num):
        self.DeviceId = device_id
        self.DeviceName = device_name
        self.AlarmTime = str(alarm_time)
        self.AlarmClassId = str(alarm_class_id)
        self.AlarmTargetNum = str(alarm_target_num)
        self.AlarmImageName = alarm_image_name
